import { request } from "../../utils/request";


export const get=()=>request.get<UI.Role[]>("/role/all")
export const remove=(id:number)=>request.post<null>(`/role/remove/${id}`)
export const add=(data:API.Role.Add)=>request.post<number>("/role/add",data)
export const update=(data:API.Role.Update)=>request.post<null>("/role/update",data)
export const config=(data:API.Role.Config)=>request.post<null>("/role_function/config",data)
export const rolefunc=(id:number)=>request.get<UI.RoleFunc[]>(`/role_function/list/${id}`)